//
//  XXOrderViewController.m
//  XX
//
//  Created by lly on 15/5/27.
//  Copyright (c) 2015年 lly. All rights reserved.
//

#import "XXOrderViewController.h"
#import "XXDataManager.h"
#import "XXOrderCell.h"
@interface XXOrderViewController ()

@end

@implementation XXOrderViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"我的订单";
    [self addDrawLeftButton];

    // Do any additional setup after loading the view from its nib.
}

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    if(!XXDM.isLogin)
    {
        [self addUnLoginView];
        self.tableView.hidden = YES;
    }
    else {
        self.tableView.hidden = NO;
        [self removeUnloginView];
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
#pragma mark UITableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 10;
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 1;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *cellIndentifier = @"CellIndentifier";
    XXOrderCell *cell = (XXOrderCell *)[tableView dequeueReusableCellWithIdentifier:cellIndentifier];
    
    if(!cell)
    {
        cell =  (XXOrderCell *)[[[NSBundle mainBundle] loadNibNamed:@"XXOrderCell" owner:nil options:nil] lastObject];
    }
    
    return cell;
}
#pragma mark UITableViewDelegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 80;
}


/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
